
SELECT VENDEDOR, CODIGO_FILIAL, NOME_VENDEDOR, DATA_DESATIVACAO FROM LOJA_VENDEDORES 
WHERE VENDEDOR in ('X554','9799','B976','d169','x593','d093','B289','X549','c980','9112','d340','d317','d335',
'c895','c226','8239','3878','8398','8754','8793','c400','c621','x789','8847','c190','c325','c842','D023','8949',
'B819','C861','D230','D198','8261','b426','b679','c031','x685','c904','d006','c950','b379','c791','b413','d102',
'c009','c989','d018','C275','x414','9469','c430','d047','x521','x522','x600','x730','1618','7549','9068','d317',
'c908','x652','3652','c665','c865','c955','8171','x781','5028','x607','c809','c864','x456','9170','8518','X566',
'c900','d095','x623','b071','x876','c113','c502','C170','5892','X463','C999','d014','x146','x314','c554','d165',
'c475','c428','c407','c379','a482','b064','b799','b799','d085','C156','9861','C828','c685','c871','4072','c878',
'x508','b579','d136','d176','b877','c833','d111','d112','6289','d059','d060','d061','c851','c880','c986','d335',
'c614','2367','C897','2085','6957','8674','8911','c996','d140','2383','1040','8270','b568','c127','c903','d054',
'd114','x890','B980','C202','C399','6671','8294','c753','c857','x480','x597','x889','7586','4690','8708','b273',
'6769','8513','8661','c907','x533','x533','7549','C160','x843','7347','8881','b206','c743','2326','C222','D015',
'1463','3467','X741','6963','3516','7243','C431','C432','C855','D133','B635','9168','X655','8693','8696','8817',
'8751','8938','C279','C839','X817','7033','C116','C189','C542','4606','b898','D106','B820','C335','5029','d343',
'X617','X718','X761','X866','1938','5005','7058','7434','8918','C334','C609','D019','D180','X482','B599','d177',
'D053','9695','X578','X580','X606','X691','C435','X873','7399','8176','8593','8745','8896','D195','4921','1704',
'2511','5173','d056','C142','C909','8914','A966','X723','8854','5732','7601','8077','8099','B538','6325','6804',
'7150','8838','D184','2320','6622','9409','B803','C143','C530','C532','C533','C552','D142','D148','D154','X492',
'B737','C852','8781','X613','X627','X868','X875','1152','D038','c828','X577','8063','8551','B727','C879','c937',
'x656','0091','0100','1017','1048','2449','2569','2579','C303','b538','c821','d044','a547','2875','3343','d253',
'X504','X426','C303','B646','4959','C603','9969','b834','c591','2543','c624','c895','b094','d104','d302','b392',
'd268','x276','x819','d001','b396','c457','c887','c083','c962','B194','B690','3824','d453','A883','b424','c628',
'b438','x213','d109','x727','c689','c706','c818','d138','b254','7623','a928','D076','C519','D170','c119','b596',
'b499','8579','d433','b073','d432','b477','b867','c139','c702','d026','x565','x661','d340','b596','c368','x859',
'b319','c997','d338','D123','D124','d042','b449','b886','c987','d363','9694','b756','c800','c889','c935','c087',
'x209','d301','C409','C476','C477','C573','C638','C916','C922','C932','C973','C463','D469','D483','d185','c935',
'c087','d165','x209','d346','d301','d531','b422','b763','d321','d465','x776','c120','8926','x829','d333','d247',
'c193','d356','d516','d517','d537','5188','D024','C198','D594','D485','9670','C967','9210','D358','D058','c819',
'c721','x550','d065','D501','D714','D049','B049','C882','C688','D034','B107','D107','B851','1017','C564','B682',
'D084','D264','D307','B016','B680','D278','D370','D434','8851','D110','9315','b734','d337','d346','d374','d208',
'd550','7744','c734','b372','c501','d227','d287','d288','d498','d634','C943','D013','D885','D300','B953',
'B103','C316','C381','D094','D296','D326','X461','X793','C943','D013','D885','D300','B469','B953','B103','C316',
'C381','D094','D296','D326','X461','X793','C943','D013','D885','D300','B469','B469','B331','C185','B958','C921',
'X838','D565')

SELECT VENDEDOR,DESC_CARGO,CODIGO_FILIAL,NOME_VENDEDOR,DATA_ATIVACAO,DATA_DESATIVACAO FROM LOJA_VENDEDORES 
WHERE VENDEDOR in ('b372','c501','d227','d287','d288','d498','d634')

UPDATE LOJA_VENDEDORES  SET DATA_DESATIVACAO = '2008-09-03' 
WHERE VENDEDOR IN ('D558','D571','D580','D420','B953',
'd208','d550','7744','c734','D246','b372','c501','d227','d287','d288','d498','d634','C911','a980','d226','C943','D013',
'D885','D300','B469','B953','B103','C316','C381','D094','D296','D326','X461','X793','C943','D013','D885','D300','B469',
'B469','B331','C185','B958','C921','X838','D565')


/*
UPDATE CLIENTES_VAREJO   SET STATUS = '2' 
WHERE CODIGO_CLIENTE IN ('d433','b073','d432')
*/

SELECT CODIGO_CLIENTE,CLIENTE_VAREJO,FILIAL,TIPO_VAREJO,LIMITE_CREDITO,LIMITE_CREDITO_TOTAL,STATUS FROM CLIENTES_VAREJO 
WHERE CODIGO_CLIENTE in ('8579') ORDER BY LIMITE_CREDITO_TOTAL

select * from loja_operacao_filial

lx_cade client

select * from cadastro_cli_for where indica_filial = 1